package com.mvc.mapper;

import com.mvc.entity.Spu;
import com.mvc.model.ItemModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: dior
 * @Package: com.mvc.mapper
 * @ClassName: SpuMapper
 * @Description: TODO
 * @Author: Bang
 * @Date: 2021/12/1 17:11
 * @Version: 1.0
 **/
public interface SpuMapper {
    /**
     * 条件检索+分页
     * @param pars
     * @return
     */
    List<Spu> selectAll(Map<String, Object> pars);

    /**
     * 数目
     * @param pars
     * @return
     */
    int count(Map<String, Object> pars);

    Integer updateStatus(@Param(value = "id")Integer id, @Param(value = "status")Integer status);

    Integer update(Spu spu);

    Integer del(@Param(value = "id")Integer id);

    Integer add(Spu spu);

<<<<<<< HEAD
    List<Spu> query(Map<String, Object> pars);
=======
    /**
     * 添加spu
     * @param itemModel 参数
     * @return 影响行
     */
    Integer insertSpu(ItemModel itemModel);
>>>>>>> 5ff44ccb0bb58846b13fc4ac7ec4eba9202a42e4
}
